home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-07 | 4.9 KB | 123 lines | [TEXT/ttxt] |
- THINK Back 1.1
-
- Copyright © 1991,1992 Phil Shapiro
- All Rights Reserved
-
- Description
-
- This Extension enables you to compile in the background using THINK C or
- THINK Pascal under System 7.0. If a compile finishes when the compiler is
- in the background, the Notification Manager will be used to tell you that it's
- done.
-
- Installation and Use
-
- Drop THINK Back in your Extensions folder and restart. To start a
- backgroundable compile, hold down the shift key when choosing any THINK C
- or THINK Pascal action that will cause a source file to be compiled. THINK
- Back will change the compiler's progress dialog to a movable modal dialog
- box if it was proprly activated.
-
- For example, if you bring up the THINK C Make dialog box and hold down the
- shift key while clicking on the Make button, THINK Back will be activated. It
- will also be activated if you press command-shift-U instead of just
- command-U. In Pascal, press command-shift-B, "Bring Up to Date". You can
- use command-period to cancel a compile as usual. THINK Back will refuse to
- install itself if any of its needed resources are missing, or if you try to use
- it under System 6.
-
- Customizing
-
- There's no Control Panel interface for this yet, so you'll have to use ResEdit
- if you want to customize THINK Back's behavior. You can edit the PREF
- resource using the template provided. You can change:
-
- • The number of ticks that THINK C or THINK Pascal passes to
- WaitNextEvent when it's in the foreground or background. Using this, you
- can fine-tune it's performance on your machine. The default settings (5
- ticks in the foreground, 15 in the background) should provide good
- performance on a IIsi.
-
- • If THINK Back is on or off by default. If it's on by default, then you
- can disable it by holding down the shift key when starting a compile. If
- it's off by default, then THINK Back will not be activated unless you hold
- down the shift key when starting a compile. The default setting is off by
- default.
-
- • The level of notification. There are four settings:
-
- 0 - no notification at all
- 1 - mark the compiler in the Application menu with a diamond
- 2 - mark the compiler and display a rotating icon in the Application
- menu
- 3 - mark the compiler, display a rotating icon, and present an alert to
- let you know that it's finished compiling
-
- The default setting is level 2.
-
- • The number of milliseconds between calls to WaitNextEvent. The default
- setting is 400ms; you can use this number to make THINK C or Pascal as
- multi-finder friendly or unfriendly as you like.
-
- If you change the PREF resource, changes will take effect the next time you
- boot your Macintosh.
-
- How it works
-
- At INIT time, THINK Back installs a global head patch on the _GetNewDialog
- trap. This trap watches each call to GetNewDialog and looks for the THINK C
- or THINK Pascal Progress dialog box. When it sees this dialog, it installs a
- number of other patches local to the compler's heap, one of which calls
- WaitNextEvent. When the compile is finished, all of the installed patches
- are removed (except the one on _GetNewDialog). The code is loaded low in
- the System heap, and it plus its data take up less than 3K.
-
- Bugs/Odd Features
-
- Since the same dialog is used for different things in THINK C, this patch
- will also background Multi-File Search, Precompile, Check Syntax,
- Disassemble and Preprocess. The same is true for THINK Pascal and its
- Multi-File Search dialog.
-
- Credits
-
- ShowIconFamily by Patrick C. Beard
- StartupError by joe holt
-
- Version History
-
- 1.1 - supports both THINK C and THINK Pascal (!)
- - uses a Time Manager task to schedule when to call WaitNextEvent.
- This allows for much better control of performance. (Idea courtesy
- Juri Munkki.)
- - icon manager calls are used for notification icons; now the notify
- icon will be in color.
- 1.0.1 - calls WaitNextEvent less often when THINK C is in the foreground.
- When it's placed in the background, WaitNextEvent is called as often
- as before.
- - disallows reentrant use (you can't background two compiles at the
- same time)
- - disables CMaster's menu (if present) during compiles
- - uses a much more reliable method to tell if THINK C is in the
- background or not. This fixes the bug where THINK C would hang after
- switching it in & out.
- - multi-file searches are backgroundable now as well.
- 1.0 - finalized 12/18/91; identical to version 1.0b4
-
- Future enhancements
- • Save the Progress window's position between compiles and between
- launches
- • Custom sound when a compile is finished
- • Customize toggle key modifiers
- • Control Panel interface for preferences
-
- Please contact me if you find any bugs, or have any suggestions for
- improvement. Thanks for all the positive feedback that I've gotten!
-
- Phil Shapiro
-
- Internet: phils@chaos.cs.brandeis.edu
- AOL: PhilShap
- Postal:
- 70 Simpson Ave.
- Somerville, MA 02144